package com.example.xunua_mymusic;

import androidx.appcompat.app.AppCompatActivity;

import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.example.xunua_mymusic.entitys.Music;
import com.example.xunua_mymusic.utils.AFactory;
import com.squareup.picasso.Picasso;

import java.util.ArrayList;

public class playActivity extends AppCompatActivity implements View.OnClickListener {
    private ImageView img_bg,img_last,img_next,img_play,img_back;
    String url="https://gss0.bdstatic.com/-4o3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike180%2C5%2C5%2C180%2C60/sign=c2ed57fdc11b9d169eca923392b7dfea/838ba61ea8d3fd1ff51f67183f4e251f95ca5ffa.jpg";
    MainActivity mainActivity= (MainActivity) AFactory.A;
    ArrayList<Music> musics;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_play);
        init();
    }
    void init(){
        musics=mainActivity.getMusic();
        img_bg=findViewById(R.id.iv_geshou);
        img_last=findViewById(R.id.play_img_last);
        img_next=findViewById(R.id.play_img_next);
        img_play=findViewById(R.id.play_img_play);
        img_back=findViewById(R.id.play_img_back);
        img_back.setOnClickListener(this);
        img_last.setOnClickListener(this);
        img_play.setOnClickListener(this);
        img_next.setOnClickListener(this);
        //读取网络图片
        Picasso.with(this).load(url).into(img_bg);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.play_img_last:

                break;
            case R.id.play_img_play:

                break;
            case R.id.play_img_next:

                break;
        }
    }
}
